import React from 'react'
import {useState,useEffect} from "react"
import "./home1.less"
interface IMyProps {
    getFunc:Function
}
const Home1: React.FC<IMyProps> = (props: IMyProps) => {
const { getFunc } = props;
const [count, setCount] = useState<number>(0);
 
  const addCount = (val: number) => {
    setCount(val);
    getFunc(val);
  };
    return (
        <div className="home1">
           <div className='board'>
           <input type="color" />
           <input type="text" />
           </div>
           <button onClick={() => addCount(count + 1)}>数字递增</button>
        </div>
    )
}
export default Home1;
